public class ext_GenerateDRVPDFTemplate {
    Public String TAMM {get; set;}
    Public String PreApproval{get; set;}
    Public String Transfer {get; set;}
    private final Health_Card_Renewal_Form__c HCRF;
    
    Public List<Barcode__c> Barcodes {get; set;}
    public string bc1 {get; set;}
    public string bc2 {get; set;}
    public string bc3 {get; set;}

    public ext_GenerateDRVPDFTemplate(ApexPages.StandardController controller) 
    {
         this.HCRF= (Health_Card_Renewal_Form__c)controller.getRecord();
         
         Health_Card_Renewal_Form__c HC = [SELECT id, TAMM_VIP_Service__c FROM Health_Card_Renewal_Form__c WHERE id = :HCRF.Id];
         //IF(HCRF.TAMM_VIP_Service__c) TAMM = 'TAMM VIP Service' ; else TAMM = ' ';
         if(HC.TAMM_VIP_Service__c)
         {
                Tamm = 'Express Service';
         }
         else
         {
                Tamm = '';
         }
         PreApproval = 'Pre-approval required';
         Transfer = 'Transfer';
         
         Barcodes = [SELECT id, name, Image_URL__c, Application__c FROM Barcode__c WHERE Application__c = :HCRF.id];
         if(Barcodes.size() > 2)
         {
             bc1 = Barcodes[0].Image_URL__c;
             bc2 = Barcodes[1].Image_URL__c;
             bc3 = Barcodes[2].Image_URL__c;
         }
         else
         {
            bc1 = Barcodes[0].Image_URL__c;
            bc2 = Barcodes[1].Image_URL__c;
         }
    }
}